﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x804 上介绍了“空白页”项模板

namespace ForumPages
{
    /// <summary>
    /// 可用于自身或导航至 Frame 内部的空白页。
    /// </summary>
    public sealed partial class FirstPage : Page
    {
        public FirstPage()
        {
            this.InitializeComponent();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            /*  Crawler crawler = new Crawler();
              NewsPage newspage = new NewsPage();
              NewsList currentlist = (NewsList)e.Parameter;
              string newsContent = crawler.GetArticle(currentlist.ContentAd);
              string newsIm = currentlist.ImageAddress;
              NewsContentText.Text = newsContent;
              NewsImage.Source = new BitmapImage(new Uri(newsIm));*/
             Forumpost forumpost = (Forumpost)e.Parameter;
             string title = forumpost.Title;
             string content = forumpost.Content;
             string userid = forumpost.Id;
             string dateTime = forumpost.Createtime;
             MainForumTitle.Text =title;
             MainForumContent.Text = content;
             UserId.Text = userid;
             CreateTime.Text = dateTime;

          }
    }

   
}
